from manim import *


class PathMovement(Scene):
    def construct(self):
        path = VMobject()
        path.set_points_as_corners([LEFT * 3, UP * 2, RIGHT * 3, DOWN * 2, LEFT * 3])

        dot = Dot(color=ORANGE)
        self.add(path, dot)

        # 沿着路径移动
        self.play(MoveAlongPath(dot, path), run_time=4)
        self.wait()
